<% if object.errors.any? %>
  <div class="flash-form">
    <div class="flash flash-error">
      <span class="flash-close js-flash-close">
        <%= octicon('x') %>
      </span>
      <% if object.errors.count > 1 %>
        <% object.errors.full_messages.each do |msg| %>
          <p><%= msg %></p>
        <% end %>
      <% else %>
        <% object.errors.full_messages.each do |msg| %>
          <%= msg %>
        <% end %>
      <% end %>
    </div>
  </div>
<% end %>
